# Animation Library, Making tool

cmake_minimum_required (VERSION 2.8)

project (kat)
set (project_root_dir ${CMAKE_CURRENT_SOURCE_DIR})

# project directory shortcut
set (dep_directory ${project_root_dir}/dep)
set (implements_directory ${project_root_dir}/implements)
set (gtest_directory ${dep_directory}/gtest)
set (gmock_directory ${dep_directory}/gmock)
set (animation_directory ${implements_directory}/animation)
set (animation_tester_directory ${implements_directory}/animation_tetser)

SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin/")
SET(LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/lib/")
SET(CMAKE_BUILD_TYPE "Release")

if (MSVC)
  set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
  set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG")
  set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
  set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG")

  set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
  set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG")
  set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG")
endif ()

SET(Boost_ADDITIONAL_VERSIONS "1.49" "1.49.0")
message(AUTHOR_WARNING "We use a boost. So you must set a environment variable that named BOOST_ROOT to your boost root path installed")
find_package(Boost 1.49.0 REQUIRED)
if(Boost_FOUND)
  include_directories(${Boost_INCLUDE_DIRS})
  message(STATUS "Boost include directory : ${Boost_INCLUDE_DIRS}")
  message(STATUS "Boost library directory : ${Boost_LIBRARY_DIRS}")
endif()

add_subdirectory (tools)
add_subdirectory (implements)


## 아래는 부스트 관련 스크립트 예제. 출처 : cmake
#== Using actual libraries from within Boost: ==

#set(Boost_USE_STATIC_LIBS        ON)
#set(Boost_USE_MULTITHREADED      ON)
#set(Boost_USE_STATIC_RUNTIME    OFF)
#find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
#if(Boost_FOUND)
#   include_directories(${Boost_INCLUDE_DIRS})
#   add_executable(foo foo.cc)
#   target_link_libraries(foo ${Boost_LIBRARIES})
#endif()
 